import React from "react";
import { useCustomNavigate } from '../hooks/useNavigate';

// Myhome 组件定义
const Myhome: React.FC = () => {
    // 使用自定义导航钩子
    const { goToPage } = useCustomNavigate();

    return (
        <div>
            <h1>MyHome</h1>
            {/* 按钮点击事件，导航到另一个页面 */}
            <button onClick={() => goToPage('/AI', { state: { from: '/Myhome' } })}>Go to Another Page</button>
        </div>
    );
};

export default Myhome;